/*
 * File: J_la_T05_q1.c
 *
 * MATLAB Coder version            : 5.2
 * C/C++ source code generated on  : 23-Apr-2025 08:36:15
 */

/* Include Files */
#include "J_la_T05_q1.h"
#include <math.h>

/* Function Definitions */
/*
 * J_LA_T05_Q1
 *     U51 = J_LA_T05_Q1(IN1,IN2)
 *
 * Arguments    : const double in1[5]
 *                const double in2[5]
 *                double u51[16]
 * Return Type  : void
 */
void J_la_T05_q1(const double in1[5], const double in2[5], double u51[16])
{
  double t10;
  double t11;
  double t12;
  double t13;
  double t14;
  double t15;
  double t16;
  double t17;
  double t18;
  double t19;
  double t2;
  double t20;
  double t21;
  double t22;
  double t23;
  double t24;
  double t26;
  double t28;
  double t29;
  double t29_tmp;
  double t3;
  double t32;
  double t33;
  double t36;
  double t37;
  double t4;
  double t47;
  double t5;
  double t53;
  double t56;
  double t58;
  double t59;
  double t6;
  double t60;
  double t7;
  double t74;
  double t75;
  double t8;
  double t88;
  double t89;
  double t9;
  double t94_tmp;
  double t96;
  double t97;
  double t98;
  /*     This function was generated by the Symbolic Math Toolbox version 8.7.
   */
  /*     09-Apr-2025 18:11:44 */
  t2 = cos(in2[0]);
  t3 = cos(in2[1]);
  t4 = cos(in2[2]);
  t5 = cos(in2[3]);
  t6 = cos(in2[4]);
  t7 = cos(in1[0]);
  t8 = cos(in1[1]);
  t9 = cos(in1[2]);
  t10 = cos(in1[3]);
  t11 = cos(in1[4]);
  t12 = sin(in2[0]);
  t13 = sin(in2[1]);
  t14 = sin(in2[2]);
  t15 = sin(in2[3]);
  t16 = sin(in2[4]);
  t17 = sin(in1[0]);
  t18 = sin(in1[1]);
  t19 = sin(in1[2]);
  t20 = sin(in1[3]);
  t21 = sin(in1[4]);
  t22 = t8 * t17;
  t23 = t17 * t18;
  t58 = t2 * t7;
  t24 = t58 * t8;
  t26 = t4 * t7 * t13;
  t28 = t7 * t8 * t12;
  t29_tmp = t3 * t7;
  t29 = t29_tmp * t18;
  t32 = t2 * t4 * t13 * t17;
  t36 = t4 * t12 * t13 * t17;
  t97 = t2 * t3;
  t33 = t97 * t23;
  t3 *= t12;
  t37 = t3 * t23;
  t47 = t22 + t29;
  t8 = t23 + -(t29_tmp * t8);
  t53 = t7 * t12 * t18 + t3 * t22;
  t18 = t58 * t18 + t97 * t22;
  t56 = t14 * t8;
  t3 = t28 + -t37;
  t58 = t24 + -t33;
  t59 = t14 * t18;
  t60 = t14 * t53;
  t74 = t32 + t59;
  t75 = t36 + t60;
  t23 = t4 * t9;
  t88 = (t7 * t9 * t13 * t14 + t19 * t47) + t23 * t8;
  t29_tmp = t4 * t19;
  t89 = (t7 * t13 * t14 * t19 + -(t9 * t47)) + t29_tmp * t8;
  t94_tmp = t5 * t10;
  t96 = (-(t9 * t12 * t13 * t14 * t17) + t19 * t3) + t23 * t53;
  t97 = (t12 * t13 * t14 * t17 * t19 + t9 * t3) + -(t29_tmp * t53);
  t98 = (-(t2 * t9 * t13 * t14 * t17) + t19 * t58) + t23 * t18;
  t3 = (t2 * t13 * t14 * t17 * t19 + t9 * t58) + -(t29_tmp * t18);
  t8 = t15 * t20;
  t23 = t5 * t20;
  t53 = t26 - t56;
  t47 = (t8 * t53 + t23 * t88) + t10 * t89;
  t7 = t5 * t75 + t15 * t96;
  t12 = t5 * t74 + t15 * t98;
  t4 = t10 * t15;
  t9 = (-(t4 * t75) + t20 * t97) + t94_tmp * t96;
  t2 = (-(t4 * t74) + t20 * t3) + t94_tmp * t98;
  t97 = (t8 * t75 + t10 * t97) + -(t23 * t96);
  t3 = (t8 * t74 + t10 * t3) + -(t23 * t98);
  t18 = t6 * t21;
  t58 = t16 * t21;
  t29_tmp = t15 * t88 - t5 * t53;
  t23 = (-(t20 * t89) + t94_tmp * t88) + t4 * t53;
  u51[0] = (t11 * t47 - t58 * t29_tmp) + t18 * t23;
  u51[1] = (t11 * t3 - t18 * t2) + t58 * t12;
  u51[2] = (t11 * t97 - t18 * t9) + t58 * t7;
  u51[3] = 0.0;
  t18 = t6 * t11;
  t58 = t11 * t16;
  u51[4] = (-t21 * t47 - t58 * t29_tmp) + t18 * t23;
  u51[5] = (-t21 * t3 - t18 * t2) + t58 * t12;
  u51[6] = (-t21 * t97 - t18 * t9) + t58 * t7;
  u51[7] = 0.0;
  t18 = t16 * t23;
  u51[8] = -t6 * t29_tmp - t18;
  t58 = t6 * t12;
  t23 = t16 * t2;
  u51[9] = t58 + t23;
  t8 = t6 * t7;
  t3 = t16 * t9;
  u51[10] = t8 + t3;
  u51[11] = 0.0;
  u51[12] =
      ((((t22 * -0.01491 + t26 * 0.27898) - t29 * 0.01491) - t56 * 0.27898) -
       t6 * t29_tmp * 0.1085) -
      t18 * 0.1085;
  u51[13] =
      ((((t24 * 0.01491 + t32 * 0.27898) - t33 * 0.01491) + t59 * 0.27898) +
       t58 * 0.1085) +
      t23 * 0.1085;
  u51[14] =
      ((((t28 * 0.01491 + t36 * 0.27898) - t37 * 0.01491) + t60 * 0.27898) +
       t8 * 0.1085) +
      t3 * 0.1085;
  u51[15] = 0.0;
}

/*
 * File trailer for J_la_T05_q1.c
 *
 * [EOF]
 */
